1. Field of the Invention
The present invention relates to a method and an apparatus for temperature measurement, and more particularly to a method and an apparatus with voltage variation offset function so as to avoid a temperature measurement error caused by voltage variation.
2. Description of Related Art
Now, bipolar junction transistors (BJT) or diodes are most widely applied for thermal measurement of peripheral devices of a computer, such as a central processing unit (CPU). Since the voltage versus temperature relationship between the base and emitter of the BJT or between the cathode and the anode of the diodes is in inverse proportion, the temperature is easy to be obtained by detecting the voltage between the base and the emitter of the BJT, or the voltage between the cathode and the anode of the diode.
With reference to FIG. 2, a transistor with a base connected to a collector is equivalent to a diode. Such a transistor is used as a thermal detecting element (30). The thermal detecting element (30) obtains a current from a power supply Vref through a resistor R3, and then the thermal detecting element (30) provides a sensing voltage Vb to a comparator (40). The comparator (40) further receives a reference voltage Va from a voltage dividing circuit (10) composed of resistors R1 and R2. The comparator (40) compares the sensing voltage Vb with the reference voltage Va so as to obtain a difference value that is further amplified by an amplifier (50). Then the amplifier (50) outputs and transfers an analog signal and to an A/D converter (not shown) so as to find out the temperature.
For example, if the temperature coefficient of the thermal detecting element (30) is xe2x88x922.2 mV/xc2x0 C., it means there will be a xe2x88x922.2 millivolts voltage drop generated when temperature increases by one degree Centigrade, and the temperature variation is easily obtained by detecting the sensing voltage variation.
However, once the power supply Vref has variation, it will lead the reference voltage Va to encounter voltage floating (voltage variation), and thus the temperature measurement also has variation and cannot be precisely detected.
For example, the power supply Vref is 3.6 volts, the resistance of the resistors R1, R2 and R3 are respectively 4 Kxcexa9, 1 Kxcexa9 and 10 Kxcexa9, and the sensing voltage Vb is 0.7 volts:
(1) If the voltage variation (xcex94V) at the power supply is 0 volts, the voltage difference value between two input terminals of the comparator (40) is equal to
3.6xc3x97(1/1+4)xe2x88x920.7=0.02 volts
(2) If the voltage variation (xcex94V) at the power supply is 60 millivolts, the voltage difference value between two input terminals of the comparator (40) is equal to
3.66xc3x97(1/1+4)xe2x88x920.7=0.032 volts (the temperature error is 6 degrees Centigrade)
(3) If the voltage variation (xcex94V) at the power supply is 100 millivolts, the voltage difference value between two input terminals of the comparator (40) is equal to
3.7xc3x97(1/1+4)xe2x88x920.7=0.032 volt (the temperature error is 10 degrees Centigrade).
From the foregoing examples, it is easy to understand that even when the voltage variation is only 0.06 volts, the temperature error reaches 6 degrees Centigrade. If the voltage variation is 0.1 volts, the temperature error reaches 10 degrees Centigrade.
Therefore, the invention provides a method and apparatus for temperature measurement with voltage variation offset to mitigate and/or obviate the aforementioned problems.
The main objective of the invention is to provide a method and apparatus for temperature measurement with voltage variation offset to effectively mitigate or obviate the measurement error caused by voltage variation.
The second objective of the invention is to provide a method and apparatus for temperature measurement with voltage variation offset by adding a few elements to achieve the voltage variation offset.
To achieve these objectives of the invention, the sensing voltage is set to have variation to counterbalance the power supply variation, wherein the variation of the sensing voltage is generated based on the power supply, wthus hereby the temperature measurement error is can be obviated.
In the real circuit layout of the invention, a voltage dividing circuit composed of resistors is applied to connect to an input of a thermal detecting element in series, and the sensing voltage is taken from an output of the voltage dividing circuit, whereby the sensing voltage is also varied based on the power supply variation.
The method for temperature measurement in accordance with the present invention comprises the steps of:
applying a thermal detecting element to sense temperature;
applying a voltage dividing circuit connected between a power supply and the thermal detecting element to obtain a current;
taking a sensing voltage from the voltage dividing circuit, wherein the sensing voltage varies based on the power supply variation;
taking a reference voltage from a reference voltage dividing circuit that is connected to the power supply;
comparing the sensing voltage with the reference voltage in a comparator; and
amplifying an output voltage from the comparator.
Since the sensing voltage is synchronously varied based on the power supply variation, the temperature measurement error can be obviated.
Other objects, advantages and novel features of the invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.